package com.ruoyi.system.mapper;

import com.ruoyi.system.pojo.dto.AcceptTransactionDTO;
import com.ruoyi.system.pojo.entity.TransactionRecord;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface AgoniTransactionRecordMapper {
    @Select("select user_id from agoni_virtual_store where id = #{storeId}")
    Long selectSellerIdByStoreId(Integer storeId);

    int insertTransactionRecord(TransactionRecord transactionRecord);

    @Select("select * from agoni_transaction_record where seller_id = #{userId}")
    List<TransactionRecord> selectTransactionRecordBySellerId(long userId);

    @Select("select * from agoni_transaction_record where id = #{id}")
    TransactionRecord selectTransactionRecordById(Long id);

    int updateTransactionRecord(TransactionRecord transactionRecord);

    @Select("select * from agoni_transaction_record where buyer_id = #{userId}")
    List<TransactionRecord> selectTransactionRecordByBuyerId(long userId);

}
